package Solutions;

public class Solution6 {
    public static void main(String[] args) {
        int num=12321;
        StringBuilder sb=new StringBuilder();
        String str=String.valueOf(num);
        int j=0;
        for (int i=str.length()-1;i>=j;i--){
            char ch=str.charAt(i);
            if (ch==str.charAt(j)){
                j++;
                StringBuilder append = sb.append(ch);
                System.out.println(append);
            }else {
                System.out.println(str+"不是回文串");
                break;
            }
        }
    }
}
